<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

        <title>培训管理</title>

        <link href="../../css/mine.css" type="text/css" rel="stylesheet" />
    </head>
    <body>
        <style>
            .tr_color{background-color: #9F88FF}
        </style>
        <div class="div_head">
            <span>
                <span style="float: left;">当前位置是：培训管理-》培训计划</span>
                <span style="float: right; margin-right: 8px; font-weight: bold;">
                    <a style="text-decoration: none;" href="${pageContext.request.contextPath}/peixun/peixunjihua/add.jsp">【新增培训计划】</a>
                </span>
            </span>
        </div>
        <div></div>
        <div class="div_search">
            <span>
                <form action="${pageContext.request.contextPath}/train/list" method="get">
                    <input type="hidden" name="page" id="pageNum" value="1">
                    培训名称: 
					<input type="text" id="trainName" name="trainName" value="${trainName}"  />
					 审核状态: 
					<select name="auditStatusId">
						<option value="0">--请选择--</option>
                        <c:forEach var="a" items="${statusList}">
						<option <c:if test="${a.id ==auditStatusId }" >selected</c:if> value="${a.id}">${a.status}</option>
                        </c:forEach>
					</select>
					培训时间：
					<input type="date" name="beginTime" id="beginTime" value="<fmt:formatDate value='${beginTime}' pattern='yyyy-MM-dd'/>" />至<input type="date" name="endTime" id="endTime" value="<fmt:formatDate value='${endTime}' pattern='yyyy-MM-dd'/>"/>
                    <input value="查询" type="submit"/>
                </form>
            </span>
        </div>
        <c:if test="${pageInfo.total>0}">
            <div style="font-size: 13px; margin: 10px 5px;">
            <table class="table_a" border="1" width="100%">
                <tbody><tr style="font-weight: bold;">
                        <td width="">培训名称</td>
                        <td width="15%">培训讲师</td>						
                        <td width="15%">培训时间</td>
                        <td >培训反馈</td>
						<td width="15%">审核状态</td>                   
                        <td align="center" width="15%">操作</td>
                    </tr>
                <c:forEach var="p" items="${pageInfo.list}">
                    <tr id="product1">
                        <td>${p.trainName}</td>
                        <td>${p.trainLecturer}</td>
                        <td><fmt:formatDate value="${p.beginTime}" pattern="yyyy-MM-dd"/> </td>
                        <td>${p.trainFeedbackName}</td>
                        <td>${p.auditStatusName}</td>
                        <td>
                            <c:if test="${p.auditStatusId==1}">
                                <a href="${pageContext.request.contextPath}/peixun/peixunfankui/fankui.jsp">培训反馈</a>
                            </c:if>
                            <c:if test="${p.auditStatusId==2}">
                                <a href="add.jsp">修改</a>
                                <a href="add.jsp">明细</a>
                                <a href="">删除</a>
                            </c:if>
                            <c:if test="${p.auditStatusId==3}">
                                <a href="add.jsp">明细</a>
                            </c:if>
                        </td>
                    </tr>
                </c:forEach>
                    <tr>
                        <td colspan="20" style="text-align: center;">						
						    <a style="text-decoration: none;" href="${pageContext.request.contextPath}/train/list?pageNum=1&trainName=${trainName}&auditStatusId=${auditStatusId}&beginTime=<fmt:formatDate value="${beginTime}" pattern="yyyy-MM-dd" />&endTime=<fmt:formatDate value="${endTime}" pattern="yyyy-MM-dd" />">首页 </a>
                            <a style="text-decoration: none;" href="${pageContext.request.contextPath}/train/list?pageNum=${pageInfo.prePage<1?1:pageInfo.prePage}&trainName=${trainName}&auditStatusId=${auditStatusId}&beginTime=<fmt:formatDate value="${beginTime}" pattern="yyyy-MM-dd" />&endTime=<fmt:formatDate value="${endTime}" pattern="yyyy-MM-dd" />">上一页 </a>
                            <c:forEach var="i" begin="1" end="${pageInfo.pages}">
                                <a style="text-decoration: none;" href="${pageContext.request.contextPath}/train/list?pageNum=${i}&trainName=${trainName}&auditStatusId=${auditStatusId}&beginTime=<fmt:formatDate value="${beginTime}" pattern="yyyy-MM-dd" />&endTime=<fmt:formatDate value="${endTime}" pattern="yyyy-MM-dd" />">${i}</a>
                            </c:forEach>
                            <a style="text-decoration: none;" href="${pageContext.request.contextPath}/train/list?pageNum=${pageInfo.nextPage==0 ? pageInfo.pages : pageInfo.nextPage}&trainName=${trainName}&auditStatusId=${auditStatusId}&beginTime=<fmt:formatDate value="${beginTime}" pattern="yyyy-MM-dd" />&endTime=<fmt:formatDate value="${beginTime}" pattern="yyyy-MM-dd" />">下一页 </a>
                            <a style="text-decoration: none;" href="${pageContext.request.contextPath}/train/list?pageNum=${pageInfo.pages}&trainName=${trainName}&auditStatusId=${auditStatusId}&beginTime=<fmt:formatDate value="${beginTime}" pattern="yyyy-MM-dd" />&endTime=<fmt:formatDate value="${endTime}" pattern="yyyy-MM-dd" />"> 尾页 </a>
                            共${pageInfo.pages}页 每页显示${pageInfo.size}/共${pageInfo.total}条
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        </c:if>
        <c:if test="${pageInfo.total<=0}">
            <h1 style="align-content: center">暂无数据</h1>
        </c:if>
    </body>
<script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script>
</script>
</html>